package com.consumer.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author kuang
 * @Date 2021/8/8 10:45
 */
@RequestMapping(value = "/consumer")
@RestController
public class OrderController {

    public static final String INVOKE_YRL = "http://payment";

    @Resource
    private RestTemplate template;

    @GetMapping(value = "/getPayment")
    public String paymentInfo(){
        return  template.getForObject(INVOKE_YRL+"/payment/zk",String.class);
    }
}
